﻿<%@ page language="java" import="java.util.*,cn.ac.cintcm.dataconverge.util.Constants,com.hs.core.utils.*" pageEncoding="UTF-8"%>
<%@ page import ="cn.ac.cintcm.dataconverge.researchsubject.domain.*,cn.ac.cintcm.dataconverge.researcher.domain.*" %> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
ResmanInform obj = (ResmanInform)request.getAttribute("messageObj"); 
String reload = (String)request.getAttribute("reload");

String imagePath = path + "/index/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <title><%=Constants.APP_TITLE%>-通知公告编辑</title> 
    <script language="javascript" type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
	<script language="javascript" src="<%=path %>/index/Scripts/script.js"></script>
	<script language="javascript" src="<%=path %>/js/common.js"></script>
	<link href="<%=path %>/index/Themes/com/style.css" type="text/css" rel="stylesheet"></link>
	<script src='<%=basePath%>dwr/util.js'></script>  
	  <script >
	  function uploadFile(){
	            if('' == form1.title.value){
	            	alert("请填写标题");
	            	return;
	            }
	            if('' == form1.content.value){
	            	alert("请填写通知公告内容");
	            	return;
	            }
	            
	    		form1.submit();
	    } 
	  
	  </script>
</head>
<body class="idt_body" scroll="yes">
<form name="form1" action="<%=path %>/subjectSearch.htm?action=saveMessage" method="post" >
    <table cellpadding="0" cellspacing="0" width="100%" height="100%" id="Table8">
        <tr>
            <td valign="top" height="100%">
                <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" id="Table11">
                    <tr>
                        <td class="idt_main_m">
                            <!------------------ 标题栏 ------------------>
                            <!--- 标题 ---->
                            <table class="idt_tle_mg" cellspacing="0" cellpadding="0" width="100%">
                                <tr  >
                                    <td class="idt_tle_i">
                                        <img id="imgForm6" src="<%=imagePath %>Themes/com/idt_tle_o.gif"></td>
                                    <td class="idt_tle_f1">
                                        通知公告编辑</td>
                                </tr>
                            </table>
                            <!--- 内容 --->
                            <div id="tdForm">
                                <table border="0" cellpadding="0" cellspacing="1" width="100%" class="com_fieldset_tab">
                                    
                                    <tr>
                                        <td class="fim_l">
                                            标题：
                                        </td>
                                        <td class="fim_r"   style="width:100%">
                                            <input type="text" class="com_textbox" style="width:100%" value="<%=obj==null?"":obj.getInformTitle() %>"  name="informTitle" />
                                            <input type="hidden" class="com_textbox" style="width:80%" value="<%=obj==null?"":obj.getId() %>"  name="messageId" />
                                        </td>
                                    </tr> 
                                    <tr>
                                        <td class="fim_l"> 
                                           内容：
                                        </td>
                                        <td class="fim_r"   style="width:100%">
                                            <textarea rows="10" style="width:100%" name="content" ><%=obj==null?"":obj.getInformContent() %></textarea>
                                        </td>                           
                                    </tr> 
                                    <tr>
                                        <td class="fim_l"> 
                                           是否发布：
                                        </td>
                                        <td class="fim_r"   style="width:100%">
                                           <input type="radio" value="0" name="ispublish" <%if(null==obj||(null != obj &&"0".equals(obj.getExtend1()))){out.println(" checked");} %>/>不发布 
                                           <input type="radio" value="1" name="ispublish" <%if(null != obj &&"1".equals(obj.getExtend1())){out.println(" checked");} %>/>发布
                                        </td>                           
                                    </tr> 
                                </table>
                                <table cellspacing="0" cellpadding="0" width="100%" class="idt_bottom_mg" border="0">
                                    <tr>
                                        <td align="right">
                                            <input type="button" value="保存"  class="com_btn2"   onclick="javascript:uploadFile();"/>
                                            <input type="button" value="取消"   class="com_btn2" id="Button2" onclick="javascript:window.close();"/>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                </table> 
       </td>
       </tr>
       </table>
       </form>
                
</body>
</html>
<script type="text/javascript">
<!--
<%if(null != reload){%>
    alert("保存成功");
    if(window.opener)
	window.opener.document.pageForm.submit();
	window.close();
	
<%}%>
//-->
</script>
